<?php
/**
 * @version		$Id: category.php 1527 2012-03-12 12:45:31Z lefteris.kavadas $
 * @package		K2
 * @author		JoomlaWorks http://www.joomlaworks.net
 * @copyright	Copyright (c) 2006 - 2012 JoomlaWorks Ltd. All rights reserved.
 * @license		GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die('Restricted access');

?>

<!-- Start K2 Category Layout -->
<div id="k2Container" class="itemListView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
        <div>
            <?php foreach($this->subCategories as $key=>$subCategory): ?>
                <h3><?php echo $subCategory->name; ?></h3>
                <table width="100%"  class="tabel_news">
                 <?php foreach($this->leading as $key=>$item):
                    if($subCategory->id==$item->catid)
                        {
                           ?>
                                
                                    <tr>
                                        <td width="15%"><?php $this->item=$item;;echo $item->title;?></td>
                                         <td width="65%"><?php echo $item->fulltext;?></td>


                                         <td width="20%" style="white-space:pre; white-space:pre-wrap; white-space:pre-line; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:-moz-pre-wrap; white-space:-hp-pre-wrap; word-wrap:break-word;">
                                              <?php foreach ($this->item->attachments as $key=> $attachment): ?>
                                             <a href="<?php echo $attachment->link; ?>" /><?php echo str_replace("_"," ",$attachment->title);?></a>
                                             <?php endforeach; ?>
                                         </td>

                                    </tr>
                                
                            <?php
                            //echo $item->title;
                        }?>
                
                  <?php endforeach; ?>
                </table>
            <?php endforeach; ?>
        </div>
	
</div>
<!-- End K2 Category Layout -->
 <?php // if(count($this->item->attachments)==1 or $key==1) {echo $item->title;}else {echo "VN";}?>
